import Vue from 'vue'
import axios from "axios"
import Books from './Outdoors.vue'
import VueResource from 'vue-resource'

Vue.config.productionTip = false
Vue.prototype.$axios = axios;
Vue.use(VueResource)

new Vue({
  el: '#app',
  data: {
    camping: {},
    picnic: {},
    drive: {},
    equipment: {},
    categories: {
      camping: { 1: '湿地公园', 2: '河边营地' }
    }
  },
  render: h => h(Books),
  mounted() {
    this.$axios.get("/static/data.json").then(function (res) {
      this.camping = res.data.outdoors.camping;
      this.picnic = res.data.outdoors.picnic;
      this.drive = res.data.outdoors.drive;
      this.equipment = res.data.outdoors.equipment;
    }.bind(this))
  },
})

